package nespresso.beans;

public class Capsule {

        private String id, nom, image;
        private float prix;
        int force;
        
        public Capsule(){
                this.id       = "-NEW-";
                this.nom      = "Nom";
                this.prix     = 0;
                this.image    = "";
                this.force    = 0;

        }
        
        public Capsule(String id, String nom, float prix, int force, String image) {
            this.id       = id;
            this.nom      = nom;
            this.prix     = prix;
            this.image    = image;
            this.force    = force;
        }
        
        public String getId() {
                return id;
        }
        
        public void setId(String id) {
                this.id = id;
        }

        public String getNom() {
                return nom;
        }
        
        public void setNom(String nom) {
                this.nom = nom;
        }
        
                public float getPrix() {
                return prix;
        }
        
        public void setPrix(float prix) {
                this.prix = prix;
        }
        
        public String getImage() {
                return image;
        }
        
        public void setImage(String image) {
                this.image = image;
        }
        
        public int getForce() {
                return force;
        }

        public void setForce(int force) {
                this.force = force;
        }
        
        public boolean InsertCapsule() {
                boolean ok = false;
                
                Base bc = new Base();
                ok = bc.InsertCapsule(this);
                return ok;
        }
}
